<?php

include "scripts/connectDB.php";

$res = mysql_query("SELECT * FROM clan ORDER BY clan ASC")
or die("Invalid query: " . mysql_query());
echo '<select name="clan_id">';
echo '<option value="clan_id">Velg clan</option>';

while ($row = mysql_fetch_assoc($res)) {
  $clan_id = $row['clan_id'];
  $clan = $row['clan'];
 
  echo "<option value='$clan_id'>$clan</option>";
  
}
echo "</select>";
?>

